package define
{

	[Bindable]
	public class CharacterConst
	{
		private static var _l:Localization;

		public static function initialize():void
		{
			_l = Localization.instance;

			CLASS_PROMPT = _l.s("class") + "..";
			TALENT_PROMPT = _l.s("char_type") + "..";

			DEATH_KNIGHT = _l.s("death_knight");
			DRUID = _l.s("druid");
			HUNTER = _l.s("hunter");
			MAGE = _l.s("mage");
			PALADIN = _l.s("paladin");
			PRIEST = _l.s("priest");
			ROGUE = _l.s("rogue");
			SHAMAN = _l.s("shaman");
			WARLOCK = _l.s("warlock");
			WARRIOR = _l.s("warrior");

			DEATH_KNIGHT_TALENT_BLOOD = _l.s("blood");
			DEATH_KNIGHT_TALENT_FROST = _l.s("frost");
			DEATH_KNIGHT_TALENT_UNHOLY = _l.s("unholy");
			DRUID_TALENT_BALANCE = _l.s("balance");
			DRUID_TALENT_FERAL_COMBAT = _l.s("feral_combat");
			DRUID_TALENT_RESTORATION = _l.s("restoration");
			HUNTER_TALENT_BEAST_MASTERY = _l.s("beast_mastery");
			HUNTER_TALENT_MARKSMANSHIP = _l.s("marksmanship");
			HUNTER_TALENT_SURVIVAL = _l.s("survival");
			MAGE_TALENT_ARCANE = _l.s("arcane");
			MAGE_TALENT_FIRE = _l.s("fire");
			MAGE_TALENT_FROST = _l.s("frost");
			PALADIN_TALENT_HOLY = _l.s("holy");
			PALADIN_TALENT_PROTECTION = _l.s("protection");
			PALADIN_TALENT_RETRIBUTION = _l.s("retribution");
			PRIEST_TALENT_DISCIPLINE = _l.s("discipline");
			PRIEST_TALENT_HOLY = _l.s("holy");
			PRIEST_TALENT_SHADOW = _l.s("shadow");
			ROGUE_TALENT_ASSASSINATION = _l.s("assassination");
			ROGUE_TALENT_COMBAT = _l.s("combat");
			ROGUE_TALENT_SUBTLETY = _l.s("subtlety");
			SHAMAN_TALENT_ELEMENTAL = _l.s("elemental");
			SHAMAN_TALENT_ENHANCEMENT = _l.s("enhancement");
			SHAMAN_TALENT_RESTORATION = _l.s("restoration");
			WARLOCK_TALENT_AFFLICTION = _l.s("affliction");
			WARLOCK_TALENT_DEMONOLOGY = _l.s("demonology");
			WARLOCK_TALENT_DESTRUCTION = _l.s("destruction");
			WARRIOR_TALENT_ARMS = _l.s("arms");
			WARRIOR_TALENT_FURY = _l.s("fury");
			WARRIOR_TALENT_PROTECTION = _l.s("protection");

			TYPE_TANK = _l.s("tank");
			TYPE_MELEE = _l.s("melee");
			TYPE_CASTER = _l.s("caster");
			TYPE_HEALER = _l.s("healer");
		}
		public static var CLASS_PROMPT:String;
		public static var TALENT_PROMPT:String;

		public static var DEATH_KNIGHT:String;
		public static var DRUID:String;
		public static var HUNTER:String;
		public static var MAGE:String;
		public static var PALADIN:String;
		public static var PRIEST:String;
		public static var ROGUE:String;
		public static var SHAMAN:String;
		public static var WARLOCK:String;
		public static var WARRIOR:String;

		public static var DEATH_KNIGHT_TALENT_BLOOD:String;
		public static var DEATH_KNIGHT_TALENT_FROST:String;
		public static var DEATH_KNIGHT_TALENT_UNHOLY:String;
		public static var DRUID_TALENT_BALANCE:String;
		public static var DRUID_TALENT_FERAL_COMBAT:String;
		public static var DRUID_TALENT_RESTORATION:String;
		public static var HUNTER_TALENT_BEAST_MASTERY:String;
		public static var HUNTER_TALENT_MARKSMANSHIP:String;
		public static var HUNTER_TALENT_SURVIVAL:String;
		public static var MAGE_TALENT_ARCANE:String;
		public static var MAGE_TALENT_FIRE:String;
		public static var MAGE_TALENT_FROST:String;
		public static var PALADIN_TALENT_HOLY:String;
		public static var PALADIN_TALENT_PROTECTION:String;
		public static var PALADIN_TALENT_RETRIBUTION:String;
		public static var PRIEST_TALENT_DISCIPLINE:String;
		public static var PRIEST_TALENT_HOLY:String;
		public static var PRIEST_TALENT_SHADOW:String;
		public static var ROGUE_TALENT_ASSASSINATION:String;
		public static var ROGUE_TALENT_COMBAT:String;
		public static var ROGUE_TALENT_SUBTLETY:String;
		public static var SHAMAN_TALENT_ELEMENTAL:String;
		public static var SHAMAN_TALENT_ENHANCEMENT:String;
		public static var SHAMAN_TALENT_RESTORATION:String;
		public static var WARLOCK_TALENT_AFFLICTION:String;
		public static var WARLOCK_TALENT_DEMONOLOGY:String;
		public static var WARLOCK_TALENT_DESTRUCTION:String;
		public static var WARRIOR_TALENT_ARMS:String;
		public static var WARRIOR_TALENT_FURY:String;
		public static var WARRIOR_TALENT_PROTECTION:String;

		public static var TYPE_TANK:String;
		public static var TYPE_MELEE:String;
		public static var TYPE_CASTER:String;
		public static var TYPE_HEALER:String;

		public static function getAllClasses():Array
		{
			return [DEATH_KNIGHT, DRUID, HUNTER, MAGE, PALADIN, PRIEST, ROGUE, SHAMAN, WARLOCK, WARRIOR];
		}

		public static function getTalents(propClass:String):Array
		{
			if(propClass == DEATH_KNIGHT)
				return [DEATH_KNIGHT_TALENT_BLOOD, DEATH_KNIGHT_TALENT_FROST, DEATH_KNIGHT_TALENT_UNHOLY];
			else if(propClass == DRUID)
				return [DRUID_TALENT_BALANCE, DRUID_TALENT_FERAL_COMBAT, DRUID_TALENT_RESTORATION];
			else if(propClass == HUNTER)
				return [HUNTER_TALENT_BEAST_MASTERY, HUNTER_TALENT_MARKSMANSHIP, HUNTER_TALENT_SURVIVAL];
			else if(propClass == MAGE)
				return [MAGE_TALENT_ARCANE, MAGE_TALENT_FIRE, MAGE_TALENT_FROST];
			else if(propClass == PALADIN)
				return [PALADIN_TALENT_HOLY, PALADIN_TALENT_PROTECTION, PALADIN_TALENT_RETRIBUTION];
			else if(propClass == PRIEST)
				return [PRIEST_TALENT_DISCIPLINE, PRIEST_TALENT_HOLY, PRIEST_TALENT_SHADOW];
			else if(propClass == ROGUE)
				return [ROGUE_TALENT_ASSASSINATION, ROGUE_TALENT_COMBAT, ROGUE_TALENT_SUBTLETY];
			else if(propClass == SHAMAN)
				return [SHAMAN_TALENT_ELEMENTAL, SHAMAN_TALENT_ENHANCEMENT, SHAMAN_TALENT_RESTORATION];
			else if(propClass == WARLOCK)
				return [WARLOCK_TALENT_AFFLICTION, WARLOCK_TALENT_DEMONOLOGY, WARLOCK_TALENT_DESTRUCTION];
			else if(propClass == WARRIOR)
				return [WARRIOR_TALENT_ARMS, WARRIOR_TALENT_FURY, WARRIOR_TALENT_PROTECTION];
			else
				return null;
		}

		public static function getTypes(propClass:String):Array
		{
			if(propClass == DEATH_KNIGHT)
				return [TYPE_TANK, TYPE_MELEE];
			else if(propClass == DRUID)
				return [TYPE_MELEE, TYPE_CASTER, TYPE_HEALER];
			else if(propClass == HUNTER)
				return [TYPE_MELEE];
			else if(propClass == MAGE)
				return [TYPE_CASTER];
			else if(propClass == PALADIN)
				return [TYPE_TANK, TYPE_MELEE, TYPE_HEALER];
			else if(propClass == PRIEST)
				return [TYPE_CASTER, TYPE_HEALER];
			else if(propClass == ROGUE)
				return [TYPE_MELEE];
			else if(propClass == SHAMAN)
				return [TYPE_MELEE, TYPE_CASTER, TYPE_HEALER];
			else if(propClass == WARLOCK)
				return [TYPE_CASTER];
			else if(propClass == WARRIOR)
				return [TYPE_TANK, TYPE_MELEE];
			else
				return null;
		}

		public static function getType(propClass:String, propTalent:String):String
		{
			switch(propClass)
			{
				case DEATH_KNIGHT:
					switch(propTalent)
					{
						case DEATH_KNIGHT_TALENT_FROST:
							return TYPE_TANK;
						case DEATH_KNIGHT_TALENT_BLOOD:
						case DEATH_KNIGHT_TALENT_UNHOLY:
							return TYPE_MELEE;
					}
				case DRUID:
					switch(propTalent)
					{
						case DRUID_TALENT_FERAL_COMBAT:
							return TYPE_MELEE;
						case DRUID_TALENT_BALANCE:
							return TYPE_CASTER;
						case DRUID_TALENT_RESTORATION:
							return TYPE_HEALER;
					}
				case HUNTER:
					switch(propTalent)
					{
						case HUNTER_TALENT_BEAST_MASTERY:
						case HUNTER_TALENT_MARKSMANSHIP:
						case HUNTER_TALENT_SURVIVAL:
							return TYPE_MELEE;
					}
				case MAGE:
					switch(propTalent)
					{
						case MAGE_TALENT_ARCANE:
						case MAGE_TALENT_FIRE:
						case MAGE_TALENT_FROST:
							return TYPE_CASTER;
					}
				case PALADIN:
					switch(propTalent)
					{
						case PALADIN_TALENT_PROTECTION:
							return TYPE_TANK;
						case PALADIN_TALENT_RETRIBUTION:
							return TYPE_MELEE;
						case PALADIN_TALENT_HOLY:
							return TYPE_HEALER;
					}
				case PRIEST:
					switch(propTalent)
					{
						case PRIEST_TALENT_DISCIPLINE:
						case PRIEST_TALENT_HOLY:
							return TYPE_HEALER;
						case PRIEST_TALENT_SHADOW:
							return TYPE_CASTER;
					}
				case ROGUE:
					switch(propTalent)
					{
						case ROGUE_TALENT_ASSASSINATION:
						case ROGUE_TALENT_COMBAT:
						case ROGUE_TALENT_SUBTLETY:
							return TYPE_MELEE;
					}
				case SHAMAN:
					switch(propTalent)
					{
						case SHAMAN_TALENT_ENHANCEMENT:
							return TYPE_MELEE;
						case SHAMAN_TALENT_ELEMENTAL:
							return TYPE_CASTER;
						case SHAMAN_TALENT_RESTORATION:
							return TYPE_HEALER;
					}
				case WARRIOR:
					switch(propTalent)
					{
						case WARRIOR_TALENT_ARMS:
						case WARRIOR_TALENT_FURY:
							return TYPE_MELEE;
						case WARRIOR_TALENT_PROTECTION:
							return TYPE_TANK;
					}
				case WARLOCK:
					switch(propTalent)
					{
						case WARLOCK_TALENT_AFFLICTION:
						case WARLOCK_TALENT_DEMONOLOGY:
						case WARLOCK_TALENT_DESTRUCTION:
							return TYPE_CASTER;
					}
			}
			return "";
		}
	}
}